package com.gxa.learning.core.pojo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.io.Serializable;

/**
 * 问卷问题实体类
 *
 * @Author ChenJ
 * @date 2021/12/02 14:20
 **/
@AllArgsConstructor
@NoArgsConstructor
@Data
@Table(name = "tb_template")
@ApiModel
public class Template implements Serializable {

    /**
     * 问卷编号
     */
    @Id
    @Column(name = "template_id")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @ApiModelProperty(name = "id", value = "id", dataType = "Long", example = "问卷编号")
    private Long id;

    /**
     * 问卷题型 1.选星星 2.简答题
     */
    @Column(name = "template_type", unique = true)
    @ApiModelProperty(name = "type", value = "type", dataType = "Integer", example = "问卷题型 1.选星星 2.简答题")
    private Integer type;

    /**
     * 问卷题目
     */
    @Column(name = "template_question", unique = true)
    @ApiModelProperty(name = "question", value = "question", dataType = "String", example = "问卷题目")
    private String question;

    /**
     * 问卷说明
     */
    @Column(name = "template_explain", unique = true)
    @ApiModelProperty(name = "explain", value = "explain", dataType = "String", example = "问卷说明")
    private String explain;

    /**
     * 星星数
     */
    @Column(name = "template_star")
    @ApiModelProperty(name = "star", value = "star", dataType = "Integer", example = "星星数")
    private Integer star;

    /**
     * 问卷模板编号 关联问卷模板
     */
    @Column(name = "questionnaire_id", unique = true)
    @ApiModelProperty(name = "questionnaireId", value = "questionnaireId", dataType = "Long", example = "问卷模板编号 关联问卷模板")
    private Long questionnaireId;

    /**
     * 问卷答案
     */
    @Column(name = "template_answer")
    @ApiModelProperty(name = "answer", value = "answer", dataType = "String", example = "问卷答案")
    private String answer;

}
